import javax.servlet.*;
import javax.servlet.http.*;

def domainName = request.getParameter("domainName")
def domainDocsLocation = request.getParameter("domainDocsLocation")

//def logLines = NodeDomainTransforms.runTransforms("MyDomain", "http://localhost:8080/timegraph/MyDomain.backup")
def domainGenHome = System.getProperty("catalina.home")+"/"+"webapps"+"/"+"timegraph"
ConfigVars.DOMAIN_GEN_HOME = domainGenHome

logger = Logger.getLogger()
logger.inServletMode = true
logger.servletContext = context

def logLines = NodeDomainTransforms.runTransforms(domainName, domainDocsLocation, domainGenHome)

request.setAttribute("logLines", logLines)
request.setAttribute("domainName", domainName)
request.setAttribute("domainDocsLocation", domainDocsLocation)

new MyController().forward("viewresults.gsp", request, response)
